import tkinter as tk
from tkinter import font
import time
import datetime

def update_time():
    current_time = time.strftime('%H:%M:%S')
    time_label.config(text=current_time)
    time_label.after(1000, update_time)

def update_date():
    current_date = datetime.date.today().strftime('%Y-%m-%d')
    date_label.config(text=current_date)

root = tk.Tk()
root.title("时间显示器")
root.geometry("300x200")
root.configure(bg='white')

time_font = font.Font(family="Helvetica", size=48, weight="bold")
date_font = font.Font(family="Helvetica", size=16)

time_label = tk.Label(root, text="", font=time_font, bg='white')
time_label.pack(pady=30)

date_label = tk.Label(root, text="", font=date_font, bg='white')
date_label.pack()

update_time()
update_date()

root.mainloop()